package com.ruoyi.permission.mapper;

import com.ruoyi.permission.Dao.SerDevicePermi;
import com.ruoyi.permission.domain.DevicePermiInsectInfo;
import com.ruoyi.permission.domain.EzvizDeviceName;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SerDevicePermiMapper {

    int deleteByPrimaryKey(Integer id);

    int deleteByDeviceSerial(String deviceSerial);

    int insert(SerDevicePermi record);

    int insertSelective(SerDevicePermi record);

    SerDevicePermi selectByPrimaryKey(Integer id);

    SerDevicePermi selectByDeviceSerialAndTypeId(SerDevicePermi record);

    SerDevicePermi selectByDeviceIdAndTypeId(SerDevicePermi record);

    SerDevicePermi selectByDeviceSerial(String deviceSerial);
    List<SerDevicePermi> selectAllDevicePermi();

    //获取所有id和deviceNo
    List<SerDevicePermi> selectAllId();

    int updateByPrimaryKeySelective(SerDevicePermi record);

    int updateByPrimaryKey(SerDevicePermi record);

    //根据设备id获取虫情权限的列表
    List<DevicePermiInsectInfo> selectInsectListByDeviceId(int id);

    //获取所有虫情权限
    List<DevicePermiInsectInfo> selectAllInsectList();

    //根据权限id修改球机名称
    public int updateEzvizDeviceNameById(EzvizDeviceName ezvizDeviceName);

}